This is required for `cargo run` to work
ret.push((pkg, t, self.lib_profile(pkg.package_id())));
}
- // If this is a test profile, then we need to ensure that all binaries
- // are built.
+ // Integration tests/benchmarks require binaries to be built
if profile.test && (target.is_test() || target.is_bench()) {
ret.extend(pkg.targets().iter().filter(|t| t.is_bin())
.map(|t| (pkg, t, self.lib_profile(pkg.package_id()))));
if profile.test {
cx.compilation.tests.push((target.name().to_string(), dst));
- } else if target.is_bin() {
+ } else if target.is_bin() || target.is_example() {
cx.compilation.binaries.push(dst);
} else if target.is_lib() {
let pkgid = pkg.package_id().clone();